import Layout from '@/layout'

const sanitationRouter = [
  {
    path: '/sanitation/quality',
    component: Layout,
    meta: { title: '质量管理', icon: 'icon_quality' },
    children: [
      {
        path: '/sanitation/quality/event-monitor',
        component: () => import('@/views/sanitation/quality/event/list'),
        meta: { title: '事件管理' }
      },
      {
        path: '/sanitation/quality/patrol',
        component: () => import('@/views/sanitation/task/task_patrol'),
        meta: { title: '巡查排班' }
      }
    ]
  },
  {
    path: '/sanitation/task',
    component: Layout,
    meta: { title: '任务管理', icon: 'icon_task' },
    children: [
      {
        path: '/sanitation/task/monitoring',
        component: () => import('@/views/sanitation/task/monitoring'),
        meta: { title: '作业监控' }
      },
      {
        path: '/sanitation/task/attendance-report',
        component: () => import('@/views/tree/index'),
        meta: { title: '考勤统计' }
      },
      {
        path: '/sanitation/task/clear-manage',
        component: () => import('@/views/sanitation/task/task_clear'),
        meta: { title: '清扫保洁' }
      },
      {
        path: '/sanitation/task/middle-manage',
        component: () => import('@/views/sanitation/task/task_middle'),
        meta: { title: '中转站' }
      },
      {
        path: '/sanitation/task/toilets-manage',
        component: () => import('@/views/sanitation/task/task_toilets'),
        meta: { title: '公厕管理' }
      },
      {
        path: '/sanitation/task/garbage-transport',
        component: () => import('@/views/sanitation/task/task_garbage'),
        meta: { title: '垃圾分类收运' }
      }
    ]
  },
  {
    path: '/sanitation/violate-rules',
    component: Layout,
    meta: { title: '违规定义', icon: 'icon_violation' },
    children: [
      {
        path: '/sanitation/violate-rules/task',
        component: () => import('@/views/sanitation/violate_define'),
        meta: { title: '任务违规' }
      }
    ]
  },

  // 404 page must be placed at the end !!!
  { path: '*', redirect: '/404', hidden: true }
]

export default sanitationRouter
